Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightning: optimize checkpoint size #55230

Merged
merged 6 commits into from
Aug 8, 2024
Merged

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Aug 6, 2024

What problem does this PR solve?

Issue Number: close #55054

Problem Summary:

What changed and how does it work?

see #55054 (comment), as add-index-by-sql is not a frequent used feature, we can avoid save table info when it's not used

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)

before this pr, import 5k db in the issue takes 1-2.5 hours, after is 21m. NOTE: those time doesn't take create table/db into considertion

  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 6, 2024
Copy link

tiprow bot commented Aug 6, 2024

Hi @D3Hunter. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@D3Hunter D3Hunter requested a review from lance6716 August 6, 2024 09:50
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 51.61290% with 15 lines in your changes missing coverage. Please review.

Project coverage is 75.4327%. Comparing base (52b4c8a) to head (9e5609c).
Report is 43 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #55230        +/-   ##
================================================
+ Coverage   72.8912%   75.4327%   +2.5414%     
================================================
  Files          1568       1597        +29     
  Lines        439198     459107     +19909     
================================================
+ Hits         320137     346317     +26180     
+ Misses        99390      91799      -7591     
- Partials      19671      20991      +1320     
Flag Coverage Δ
integration 51.5297% <51.6129%> (?)
unit 72.4457% <55.5555%> (+0.5492%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.9567% <ø> (ø)
parser ∅ <ø> (∅)
br 51.7979% <ø> (+5.9079%) ⬆️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 7, 2024
@lance6716
Copy link
Contributor

/cc @GMHDBJD

@ti-chi-bot ti-chi-bot bot requested a review from GMHDBJD August 7, 2024 07:49
Copy link
Contributor

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

ti-chi-bot bot commented Aug 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: GMHDBJD, lance6716

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Aug 8, 2024
Copy link

ti-chi-bot bot commented Aug 8, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-08-07 07:49:38.710831712 +0000 UTC m=+424708.577930801: ☑️ agreed by lance6716.
  • 2024-08-08 06:30:32.375982589 +0000 UTC m=+506362.243081679: ☑️ agreed by GMHDBJD.

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Aug 8, 2024

seems caused by slow running of parallel import

tidb lightning encountered error: [Lightning:MetaMgr:ErrMetaMgrUnknown]unknown error occur on meta manager: check whether this task has started before failed: fetch task meta failed: Error 1146 (42S02): Table 'lightning_metadata.task_meta_v2' doesn't exist

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Aug 8, 2024

/retest

Copy link

tiprow bot commented Aug 8, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Aug 8, 2024

/retest

Copy link

tiprow bot commented Aug 8, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@D3Hunter
Copy link
Contributor Author

D3Hunter commented Aug 8, 2024

/retest

Copy link

tiprow bot commented Aug 8, 2024

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot merged commit a9a5b97 into pingcap:master Aug 8, 2024
24 checks passed
@D3Hunter D3Hunter deleted the opt-file-cp branch August 8, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
3 participants